package graph_viewer.animator;

import java.awt.*;
import javax.swing.*;

import graph_viewer.canvas.*;
import graph_viewer.structure.*;
/**
 * define the structure needed by aninmation
 */

public class Animator_Metrics{
	Animator		animator;
	String			node_label;
	double		move_interval, time_interval;

	Node_Position
		from_position,	to_position;

	//============================================================================
	// constructors
	//============================================================================
	public Animator_Metrics(){}

	public Animator_Metrics(	Animator animator,
										String a_label,
										Node_Position a_from_position,
										Node_Position a_to_position )
	{
		set_animator( animator );
		set_node_label( a_label	);
		set_from_position( a_from_position );
		set_to_position( a_to_position );
	}
	
	/*public boolean do_animation( JComponent animation_board ){
		return animator.do_animation( this, animation_board );	
	}*/

	public boolean do_animation( Graph_Canvas graph_canvas ){
		return animator.do_animation( this, graph_canvas );	
	}
	//============================================================================
	// setters&getters
	//============================================================================
	public void set_animator( Animator an_animator ){
		this.animator = an_animator;
	}

	public Animator get_animator(){
		return this.animator;
	}

	public void set_node_label( String a_label	){
		this.node_label	 = a_label;
	}

	public String get_node_label(){
		return this.node_label;
	}

	public void set_move_interval( double a_move_interval ){
		this.move_interval	= a_move_interval;
	}

	public double get_move_interval(){
		return this.move_interval;
	}

	public void set_time_interval( double a_time_interval ){
		this.time_interval = a_time_interval;
	}

	public double get_time_interval(){
		return this.time_interval;
	}

	public void set_from_position( Node_Position a_from_position ){
		this.from_position	 = a_from_position;
	}

	public Node_Position get_from_position(){
		return this.from_position;
	}

	public void set_to_position( Node_Position a_to_position ){
		this.to_position	= a_to_position;
	}

	public Node_Position get_to_position(){
		return this.to_position;
	}
}//:~
